package com.evon.yardmanagement.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Model interface for country
 * 
 * @author vgaurav
 * 
 */
@Entity
@Table(name = "country")
@AttributeOverride( name="id", column = @Column(name="COUNTRY_ID") )
public class Country extends BaseModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Column(name = "COUNTRY_NAME")
	private String countryName;
	@Column(name = "COUNTRY_CODE")
	private String countryCode;

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "country")
	private List<State> states;
	
	public String getCountryName() {
		return countryName;
	}

	
	public String getCountryCode() {
		return countryCode;
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}


	public List<State> getStates() {
		return states;
	}


	public void setCountryName(String countryName) {
		this.countryName = countryName;
	}


	public void setStates(List<State> states) {
		this.states = states;
	}
	
	
}
